package feesmodule.converter;

import feesmodule.domain.JurisdictionServices;
import feesmodule.domain.Service;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class ServiceMapConverter
{

    private JurisdictionServices serviceMapping;

    public ServiceMapConverter(JurisdictionServices service)
    {
        this.serviceMapping = service;
    }

    public ServiceMapConverter()
    {

    }

    @XmlElement(name="conditions")
    public ConditionSetsConverter getConditions()
    {
        return new ConditionSetsConverter(serviceMapping);
    }
    @XmlElement(name="issuerservice")
    public ServiceConverter getIssuerService()
    {
        Service issuerService = serviceMapping.getIssuerService();
        if(issuerService != null )
            return new ServiceConverter(issuerService);
        return null;
    }
    @XmlElement(name="acquirerservice")
    public ServiceConverter getAcquirerService()
    {
        Service acquirerService = serviceMapping.getAcquirerService();
        if(acquirerService != null)
            return new ServiceConverter(acquirerService);

            return null;
    }


}
